package com.sz.common.core.system.service;

import com.sz.common.core.system.entity.UnitConversion;

import java.math.BigDecimal;
import java.util.List;

/**
 * Function: UnitConversionService. <br>
 * Date: 2017年02月14日 11:17 <br>
 * Author: wentao.chang
 */
public interface UnitConversionService {

    String WEIGHT = "weight";
    String LENGTH = "length";

    List<UnitConversion> findByType(String type);

    BigDecimal getTargetWeight(BigDecimal weight, String fromUnit, String toUnit);

    BigDecimal getTargetLength(BigDecimal length, String fromUnit, String toUnit);

}
